/**
 * Created by apple on 2017/11/13.
 */

import React, {Component} from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View
} from 'react-native';
import {Card, WhiteSpace, WingBlank} from 'antd-mobile'
import Request from '../../../publicServer/request'

export default class Java extends Component {
  constructor(props) {
    super(props);
    this.state = {}
  }

  render() {
    let {data} = this.props;
    console.log(data);
    return (
      <View>
        {
          data && data.map((item, index) => {
            return (
              <WingBlank key={index} size="sm">
                <Card >
                  <Card.Header
                    title={item.orderUname}
                    thumbStyle={{width: 30, height: 30}}
                    thumb={item.image}
                    extra={item.orderHandle}
                  />
                  <Card.Body>
                    <View style={{height: 42}}>
                      <Text style={{marginLeft: 16}}>{item.orderIdNumbe}</Text>
                    </View>
                  </Card.Body>
                  <Card.Footer content={item.orderState} extra={item.orderPrice}/>
                </Card>
              </WingBlank>
            )
          })
        }
      </View>
    );
  }
}


const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  welcome: {
    fontSize: 20,
    textAlign: 'center',
    margin: 10,
  },
  instructions: {
    textAlign: 'center',
    color: '#333333',
    marginBottom: 5,
  },
});

AppRegistry.registerComponent('Java', () => Java);
